set(TARGET_TEST_LINK_LIBS xlcomm_base xlcomm_net xlcomm_net_protorpc pthread protobuf)

set(MY_TEST_BIN
  rpc_client_test
  rpc_server_test
)
FOREACH(test ${MY_TEST_BIN})
  add_executable(${test} ${test}.cc my_service.pb.cc)
  set_target_properties(${test} PROPERTIES COMPILE_FLAGS "-Wno-conversion")  # *.pb.cc忽略警告
  target_link_libraries(${test} ${TARGET_TEST_LINK_LIBS})
ENDFOREACH(test)